import java.util.Random;
import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 石仲夏
 * Date: 2025-07-04
 * Time: 19:24
 */

public class Text {
    public static void main(String[] args) {
        System.out.println(fib(8));
    }
    public static int fib2(int n){
        int num1=1;
        int num2=1;
        int num3=1;
            while (n>=3){
                num3=num1+num2;
                num1=num2;
                num2=num3;
                n--;
            }
            return num3;
    }
    public static void main8(String[] args) {
        System.out.println(fib(7));
    }
    public static int fib(int n){
        if(n==1||n==2)
        {
            return 1;
        }
        else {
            return fib(n-1)+fib(n-2);
        }
    }
    public static void main7(String[] args) {
        print(123);
    }
    public static void print(int n){
        if(n<10){
            System.out.println(n%10);
        }
        else {
            print(n/10);
            System.out.println(n%10);
        }
    }
    public static void main6(String[] args) {
        System.out.println(fun(5));
    }
    public static int fun(int n){
        if(n==1){
            return 1;
        }
        return n*fun(n-1);
    }
    public static void main5(String[] args) {

    }
    public static int add(int a,int b){
        return a+b;
    }
    public static double add(double a,double b){
        return a+b;
    }
    public static int add(int a,int b,int c){
        return a+b+c;
    }
    public static boolean isleap(int n){
        if (n%400==0||(n%100!=0&&n%4==0)){
            return true;
        }
        else {
            return false;
        }
    }
    public static void main4(String[] args) {
        boolean ret=isleap(20);
        if (ret==true){
            System.out.println("闰年");
        }
        else {
            System.out.println("平年");
        }
    }
    public static void main3(String[] args) {
        Random random=new Random(); //设置随机种子
        int num=random.nextInt(100); //生成[0,100)的数字
        Scanner sc=new Scanner(System.in);
        System.out.println(num);  //生成的数字
        while(true) {
            int guess = sc.nextInt();
            if(guess==num){
                System.out.println("恭喜猜对了");
                break;
            }
            else if(guess>num){
                System.out.println("大了");
            }
            else{
                System.out.println("小了");
            }
        }
    }
    public static void main2(String[] args) {
        Scanner sc=new Scanner(System.in);
        String str2=sc.nextLine(); //读取整一行
        System.out.println(str2);
        String str=sc.next();     //读到空格前的位置
        System.out.println(str);
    }
    public static void main1(String[] args) {
        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个字符串");
        String name=sc.next();
        System.out.println(name);
        System.out.println("请输入一个整形");
        int age=sc.nextInt();
        System.out.println(age);
        System.out.println("请输入一个浮点数");
        float source=sc.nextFloat();
        System.out.println(source);
    }
}
